﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="News" %>

<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
    <asp:LoginView ID="viewIndex" runat="server">
    <AnonymousTemplate>
     <div class ="contentregis">
       <div class="contentitle">
            <strong>Sign Up for Your New Account</strong>
       </div>
                  <asp:CreateUserWizard ID="CreateUserWizard1" runat="server" ContinueDestinationPageUrl="~/Customer/AddAccountProfile.aspx" Width="516px">
                    <WizardSteps>
                        <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server">
                            <ContentTemplate>
                                <table>
                                    <tr>
                                        <td align="center" colspan="2">
                                            Accout Info</td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName">User Name:</asp:Label>
                                        </td>
                                        <td style="width: 400px">
                                            <asp:TextBox ID="UserName" runat="server" Width="185px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" 
                                                ControlToValidate="UserName" ErrorMessage="User Name is required." 
                                                ToolTip="User Name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password">Password:</asp:Label>
                                        </td>
                                        <td style="width: 400px">
                                            <asp:TextBox ID="Password" runat="server" TextMode="Password" Width="183px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" 
                                                ControlToValidate="Password" ErrorMessage="Password is required." 
                                                ToolTip="Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="ConfirmPasswordLabel" runat="server" 
                                                AssociatedControlID="ConfirmPassword">Confirm Password:</asp:Label>
                                        </td>
                                        <td style="width: 400px">
                                            <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" 
                                                Width="181px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="ConfirmPasswordRequired" runat="server" 
                                                ControlToValidate="ConfirmPassword" 
                                                ErrorMessage="Confirm Password is required." 
                                                ToolTip="Confirm Password is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email">E-mail:</asp:Label>
                                        </td>
                                        <td style="width: 400px">
                                            <asp:TextBox ID="Email" runat="server" Width="181px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="EmailRequired" runat="server" 
                                                ControlToValidate="Email" ErrorMessage="E-mail is required." 
                                                ToolTip="E-mail is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="QuestionLabel" runat="server" AssociatedControlID="Question">Security Question:</asp:Label>
                                        </td>
                                        <td style="width: 400px">
                                            <asp:TextBox ID="Question" runat="server" Width="179px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="QuestionRequired" runat="server" 
                                                ControlToValidate="Question" ErrorMessage="Security question is required." 
                                                ToolTip="Security question is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">
                                            <asp:Label ID="AnswerLabel" runat="server" AssociatedControlID="Answer">Security Answer:</asp:Label>
                                        </td>
                                        <td style="width: 400px">
                                            <asp:TextBox ID="Answer" runat="server" Width="177px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="AnswerRequired" runat="server" 
                                                ControlToValidate="Answer" ErrorMessage="Security answer is required." 
                                                ToolTip="Security answer is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <hr />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="2">
                                            <asp:CompareValidator ID="PasswordCompare" runat="server" 
                                                ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                                                Display="Dynamic" 
                                                ErrorMessage="The Password and Confirmation Password must match." 
                                                ValidationGroup="CreateUserWizard1"></asp:CompareValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="2" style="color:Red;">
                                            <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                                        </td>
                                    </tr>
                                </table>
                            </ContentTemplate>
                        </asp:CreateUserWizardStep>
                        <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server">
                        </asp:CompleteWizardStep>
                    </WizardSteps>
                </asp:CreateUserWizard>
     </div>     
    </AnonymousTemplate>
    <LoggedInTemplate>
        <asp:Repeater ID="RepeaterSerVice" runat="server" DataSourceID="odsListService" >
            <HeaderTemplate>
                <div class="content_news">
            </HeaderTemplate>
            <ItemTemplate>
                <div class="contentitle">
                    <strong><%#Eval("SeviceName") %></strong>
                    <asp:Label ID="lblServiceID" runat="server" Text='<%# Eval("SeviceID") %>' Visible="false"></asp:Label>
                    
                </div>
                <div class="content_news_sp">
                    <asp:ObjectDataSource ID="objProductList" runat="server" DeleteMethod="Delete" 
                            InsertMethod="Insert" OldValuesParameterFormatString="original_{0}" 
                            SelectMethod="GetProductNewsByServiceID" 
                            TypeName="OnlineSMSDataSetTableAdapters.ProductNewsTableAdapter" 
                            UpdateMethod="Update">
                            <DeleteParameters>
                                <asp:Parameter Name="Original_ProNewsID" Type="Int32" />
                            </DeleteParameters>
                            <InsertParameters>
                                <asp:Parameter Name="ProTile" Type="String" />
                                <asp:Parameter Name="ProSummary" Type="String" />
                                <asp:Parameter DbType="Guid" Name="UserId" />
                                <asp:Parameter Name="ProContent" Type="String" />
                                <asp:Parameter Name="DayPost" Type="DateTime" />
                                <asp:Parameter Name="ProImage" Type="String" />
                                <asp:Parameter Name="SeviceID" Type="Int32" />
                            </InsertParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="ProTile" Type="String" />
                                <asp:Parameter Name="ProSummary" Type="String" />
                                <asp:Parameter DbType="Guid" Name="UserId" />
                                <asp:Parameter Name="ProContent" Type="String" />
                                <asp:Parameter Name="DayPost" Type="DateTime" />
                                <asp:Parameter Name="ProImage" Type="String" />
                                <asp:Parameter Name="SeviceID" Type="Int32" />
                                <asp:Parameter Name="Original_ProNewsID" Type="Int32" />
                            </UpdateParameters>
                            <SelectParameters>
                                <asp:ControlParameter ControlID="lblServiceID" Name="seviceID" PropertyName="Text" />
                            </SelectParameters>
                    </asp:ObjectDataSource>
                        
                    <asp:DataList ID="datalistNewsCurrent" runat="server" DataKeyField="ProNewsID" 
                        DataSourceID="objProductList" RepeatColumns="1" Width="100%">
                        <ItemTemplate>
                        <div class="new01">
                        <div class="new_image">  
                            <asp:Image ID="Image1" runat="server" Height="100px" 
                                ImageUrl='<%# Eval("ProImage", "~/thumb/{0}") %>' Width="100px" />
                        </div>
                        <div class="new_title_summary">
                            <div class="new_title">
                                <asp:HyperLink ID="lblTitle" runat="server" 
                                    NavigateUrl='<%# Eval("ProNewsID", "~/NewsDetails.aspx?ProNewsID={0}") %>' 
                                    Text='<%# Eval("ProTile") %>'></asp:HyperLink>
                            </div>

                            <div class="new_summary">
                                    
                            <asp:Label ID="ProSummaryLabel" runat="server" Text='<%# Eval("ProSummary") %>' />

                            </div>
                        </div>
                        </div>
                        </ItemTemplate>
                    </asp:DataList>
                       
                </div>
            </ItemTemplate>
            <FooterTemplate>
                </div>
            </FooterTemplate>
        
        </asp:Repeater>
       
        <asp:ObjectDataSource ID="odsListService" runat="server" OldValuesParameterFormatString="original_{0}" 
            SelectMethod="GetListServiceByActive" 
            TypeName="OnlineSMSDataSetTableAdapters.ListServiceTableAdapter">
               <SelectParameters>
                                <asp:ControlParameter ControlID="lblActiveService" Name="userID" PropertyName="Text" />
                            </SelectParameters>      
        </asp:ObjectDataSource>    
         
    </LoggedInTemplate>
    </asp:LoginView>
    <asp:Label ID="lblActiveService" runat="server" Visible="false"></asp:Label>
    
                

                 </asp:Content>


